package link.hwx.service.oa.impl;

import com.baomidou.dynamic.datasource.annotation.DS;
import link.hwx.entity.oa.OaBillInfoVo;
import link.hwx.mapper.oa.OaAssistanceContractMapper;
import link.hwx.service.oa.OaAssistanceContractService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@DS("OAData")
@Service
public class OaAssistanceContractServiceImpl implements OaAssistanceContractService {

    @Autowired
    private OaAssistanceContractMapper oaAssistanceContractMapper;

    @Override
    public OaBillInfoVo findAssistanceContractByRequestId(String assistanceContractMainTableName, String requestid) {
        return oaAssistanceContractMapper.findAssistanceContractByRequestId(assistanceContractMainTableName, requestid);
    }

    @Override
    public int updateAssistanceContractSrmDocNoByRequestId(String assistanceContractMainTableName, String requestid, String srmdocno) {
        return oaAssistanceContractMapper.updateAssistanceContractSrmDocNoByRequestId(assistanceContractMainTableName, requestid, srmdocno);
    }

    @Override
    public List<OaBillInfoVo> findAssistanceContractByDocnoType(String assistanceContractMainTableName, String srmdocno, String nodeType) {
        return oaAssistanceContractMapper.findAssistanceContractByDocnoType(assistanceContractMainTableName, srmdocno, nodeType);
    }
}
